
function checkID() {
	let card = document.getElementById('card').value;
	if (card.substr(0, 4) != "2024" || isNaN(card)) {
		document.getElementById("spId1").textContent = "用户名必须以'2024开头'!";
		// document.getElementById('account').focus();
	}
}
function checkPassword() {
	let password = document.getElementById("password").value;
	if (password.length < 5 || password.length > 20) {
		document.getElementById("spId2").textContent = "密码应在6-20位之间!";
		document.getElementById('account').focus();

	}

}
function checkEmail() {
	let email = document.getElementById("email").value;
	if (!email.includes("@")) {
		alert("邮箱必须包含 '@' 符号");

	}
}
function checkTel() {
	let tel = document.getElementById("tel").value;
	if (tel.length != 11 || isNaN(tel)) {
		alert("手机号必须为11位!")
	}
	if (tel.substr(0, 1) == 0) {
		alert("手机号的第一位不能是0!")
	}
}
function checkBirth() {
	let birthDay = document.getElementById("birth").value;
	if (birthDay > 2010) {
		alert("出生日期必须在2010年前!")

	}
}